package de.dhbw.karlsruhe.picsim.model.io;

import de.dhbw.karlsruhe.picsim.util.Bits;
import org.jetbrains.annotations.NotNull;

/**
 * Created by IntelliJ IDEA.
 * User: goesen
 * Date: Apr 13, 2010
 * Time: 4:29:26 PM
 */

/**
 * Repräsentiert die äußeren Pins
 */
public interface External extends ExternalReadOnly {
    void setPortA(@NotNull Bits value);

    void setPortB(@NotNull Bits value);

    void addListener(@NotNull ExternalListener listener);

    void removeListener(@NotNull ExternalListener listener);

    interface ExternalListener {
        void handlePortAChange(@NotNull Bits oldValue, @NotNull Bits newValue);

        void handlePortBChange(@NotNull Bits oldValue, @NotNull Bits newValue);

    }
}
